<div fwa-layout-container data-main="true"
	class="full-height full-width">
	<div fwa-layout-box="north" style="height: 45px;">
		<div search-form class="container-search" data-submit="onSubmit();"
			data-reset="resetBut();" data-heights="[45,160]">
			<div class="row">
				<div class="form-group  col-xs-4">
					<label class="col-xs-4 control-label text-right">医疗机构:</label>
					<div class="col-xs-7">
						<select ui-select2="selectOption" class="full-width"
							ng-model="form.medicalOrgName">
							<option value=""></option>
							<option ng-repeat="hos in baseCollection.hospitalsCollection"
								value="{{hos.orgCode}}">{{hos.orgName}}</option>
						</select>
					</div>
				</div>

				<div class="form-group  col-xs-4">
					<label class="col-xs-4 control-label text-right">医生编号:</label>
					<div class="col-xs-8">
						<input type="text" class="form-control"
							ng-model="form.doctorCodeStr">
					</div>
				</div>

				<div class="form-group  col-xs-4">
					<label class="col-xs-4 control-label text-right">结算日期:</label>
					<div class="col-xs-8 control-label">
						<date-range-input class="full-width" ng-model="form.date"
							data-type="month" data-format="yyyy-mm-dd"> </date-range-input>
					</div>
				</div>
			</div>
			<div ng-hide="searchMoreHide">
				<div class="row">
					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">个人编号:</label>
						<div class="col-xs-7">
							<input type="text" class="form-control" ng-model="form.pcnoStr">
						</div>
					</div>

					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">医生姓名:</label>
						<div class="col-xs-8 control-label">
							<input type="text" class="form-control"
								ng-model="form.doctorName">
						</div>
					</div>

					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">就诊类型:</label>
						<div class="col-xs-8">
							<select ng-model="form.visitType" class="form-control"
								ng-options="c.label for c in baseCollection.visitTypeCollection">
								<option value="">-- 全部 --</option>
							</select>
						</div>
					</div>

				</div>
				<div class="row">
					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">规则分类:</label>
						<div class="col-xs-7">
							<rule-tree lazy="false" rule-array="form.ruleArray"></rule-tree>
						</div>
					</div>

					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">机构级别:</label>
						<div class="col-xs-8">
							<drop-down code="code" text="label" row="1" width="210"
								result="form.medicalOrgLevel"
								data="baseCollection.medicalOrgLevelCollection"> </drop-down>
						</div>
					</div>

					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">机构所在地区:</label>
						<div class="col-xs-8">
							<select ng-model="form.areaCode" class="form-control"
								ng-options="c.label for c in baseCollection.areaCollection">
								<option value="">-- 请选择 --</option>
							</select>
						</div>
					</div>
					<!-- <div class="form-group  col-xs-4">
		          <label class="col-xs-4 control-label text-right">险种:</label>
		          <div class="col-xs-8">
		             <select ng-model="form.insuranceType" class="form-control" ng-options="c.label for c in baseCollection.insuranceTypeCollection">
						<option value="">-- 全部 --</option>
					</select>
		          </div>
		        </div>  -->

				</div>
				<div class="row">

					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right">机构分类:</label>
						<div class="col-xs-7">
							<drop-down code="code" text="label" row="1" width="210"
								result="form.medicalOrgType"
								data="baseCollection.medicalOrgTypeCollection"> </drop-down>
						</div>
					</div>
					<div class="form-group  col-xs-4">
						<label class="col-xs-4 control-label text-right"></label>
						<div class="col-xs-8 ">
							<input type="checkbox" checked="checked" ng-model="form.ifShow">显示非医保项目
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<div fwa-layout-box="west" style="width: 330px;" data-padding="true">
		<div fwa-layout-container fwa-layout-fullsize="true">
			<div fwa-layout-box="north" style="height: 33px; line-height: 33px;">
				<div class="row title">
					<div style="width: 30px; float: left;">&nbsp;&nbsp;</div>
					<div style="width: 115px; float: left;">
						<label>医生姓名/规则</label>
					</div>
					<div style="width: 65px; float: left;">
						<label>单据数</label>
					</div>
					<div style="width: 95px; float: left;">
						<label>涉及金额</label>
					</div>
				</div>
				<!-- 
				<table class="table fwa-table ">
					<thead >
	      				<tr>
		      				<th width="32px;"></th>
							<th width="125px;">医生姓名/规则</th>
							<th width="62px;">单据数</th>
							<th width="93px;">涉及金额</th>
						</tr>
					</thead>
				 </table> -->
			</div>
			<div fwa-layout-box="center"
				class="full-overflow-y  background-white">
				<div class="col-xs-12 " ng-repeat="data in doctorCollection">

					<div class="row" style="height: 32px; line-height: 32px;">
						<div class="text-center" style="width: 30px; float: left;"
							title="点击查看规则列表" ng-click="openRules(data);">
							<i
								ng-class="{'glyphicon-plus':!data.show,'glyphicon-minus':data.show}"
								class="glyphicon cursor-pointer"></i>
						</div>
						<div
							style="width: 115px; float: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
							<span style="width: 100px;" ng-bind="data.doctorName"> </span>
						</div>
						<div style="width: 65px; float: left;" class='text-right'>
							<span ng-bind="data.count"></span>
						</div>
						<div style="width: 95px; float: left;" class='text-right'>
							<span ng-bind="data.amount"></span>
						</div>
					</div>
					<div class="row cursor-pointer" ng-show="data.show" ng-repeat="rule in data.list"
						ng-click="getBillByDoctors(data.doctorCode,rule);"
						ng-class="{selectedRule: rule.selected}"
						style="height: 32px; line-height: 32px;">
						<div class="text-center" style="width: 30px; float: left;">
							<span class="conclusion_suspicious"
								ng-show="rule.result=='10001'">●</span> <span
								class="conclusion_height" ng-show="rule.result=='10002'">●</span>
							<span class="conclusion_illegal" ng-show="rule.result=='20001'">●</span>
						</div>
						<div
							style="width: 115px; float: left; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;">
							<span title="{{rule.ruleName}}" style='width: 100px;'
								ng:bind="rule.ruleName"> </span>
						</div>
						<div style="width: 65px; float: left;" class='text-right'>
							<span ng:bind="rule.count"></span>
						</div>
						<div style="width: 95px; float: left;" class='text-right'>
							<span ng-bind="rule.amount"></span>
						</div>
					</div>
				</div>
				<!--  
				<table class="table fwa-table table-hover" style="width:98%;">
					<tbody >
						<tr ng-repeat="doctor in doctorCollection">
							<td width="32px;">
								<div  >
									<i class="glyphicon glyphicon-plus" ng-click="openRow(doctor, $event.target);"></i>
								</div>
							</td>
							<td width="125px;">
								<div style="width:120px;" ng:bind="doctor.doctorName">
								</div>
							</td>
							<td width="62px;" class="text-right">
								<div ng:bind="doctor.count"></div>
							</td>
							<td width="93px;" class="text-right" >
								<div ng:bind="doctor.amount"></div>
							</td>
						</tr> 
					</tbody>
				</table>-->
			</div>
			<div fwa-layout-box="south" class=" page-height ">
				<page-tool total-count="doctorTotal" current-page="current"
					data-id="doctorPage" data-limit="20" data-light="true">
				</page-tool>
			</div>
		</div>
	</div>

	<div fwa-layout-box="center" data-padding="true">
		<div fwa-layout-container fwa-layout-fullsize="true">
			<div fwa-layout-box="center">
				<fwa-table columns="columns" data-rows="tableData"
					data-check="false" class="full-height"> </fwa-table>
			</div>
			<div fwa-layout-box="south" class=" page-height">
				<page-tool total-count="totalCount" current-page="currentPage"
					data-id="billPage" data-limit="20"> </page-tool>
			</div>
		</div>
	</div>
	<fwa-loading data-show="loading"> 数据加载中... </fwa-loading>
</div>
